package com.leTest.eduService.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * <p>
 * 课程
 * </p>
 *
 * @author le
 * @since 2025-02-16
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("edu_course")
@ApiModel(value = "CourseEntity对象", description = "课程")
public class CourseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 课程ID
     */
    @ApiModelProperty("课程ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 课程讲师ID
     */
    @TableField("teacher_id")
    @ApiModelProperty("课程讲师ID")
    private String teacherId;

    /**
     * 课程专业ID
     */
    @TableField("subject_id")
    @ApiModelProperty("课程专业ID")
    private String subjectId;

    /**
     * 课程专业父级ID
     */
    @ApiModelProperty("课程专业父级ID")
    @TableField("subject_parent_id")
    private String subjectParentId;

    /**
     * 课程标题
     */
    @TableField("title")
    @ApiModelProperty("课程标题")
    private String title;

    /**
     * 课程销售价格，设置为0则可免费观看
     */
    @TableField("price")
    @ApiModelProperty("课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    /**
     * 总课时
     */
    @ApiModelProperty("总课时")
    @TableField("lesson_num")
    private Integer lessonNum;

    /**
     * 课程封面图片路径
     */
    @TableField("cover")
    @ApiModelProperty("课程封面图片路径")
    private String cover;

    /**
     * 销售数量
     */
    @TableField("buy_count")
    @ApiModelProperty("销售数量")
    private Long buyCount;

    /**
     * 浏览数量
     */
    @ApiModelProperty("浏览数量")
    @TableField("view_count")
    private Long viewCount;

    /**
     * 乐观锁
     */
    @Version
    @TableField("version")
    @ApiModelProperty("乐观锁")
    private Long version;

    /**
     * 课程状态 Draft未发布  Normal已发布
     */
    @TableField("status")
    @ApiModelProperty("课程状态 Draft未发布  Normal已发布")
    private String status;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @TableField("is_deleted")
    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    private Byte isDeleted;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
